package com.ruoyi.labdata.mapper;

import java.util.List;

import com.ruoyi.labdata.domain.LabFlowTask;

/**
 * 流程任务Mapper接口
 * 
 * @author winner pan
 * @date 2022-03-10
 */
public interface LabFlowTaskMapper 
{
    /**
     * 查询流程任务
     * 
     * @param taskId 流程任务ID
     * @return 流程任务
     */
    public LabFlowTask selectLabFlowTaskById(Long taskId);

    /**
     * 查询流程任务列表
     * 
     * @param labFlowTask 流程任务
     * @return 流程任务集合
     */
    public List<LabFlowTask> selectLabFlowTaskList(LabFlowTask labFlowTask);

    /**
     * 新增流程任务
     * 
     * @param labFlowTask 流程任务
     * @return 结果
     */
    public int insertLabFlowTask(LabFlowTask labFlowTask);

    /**
     * 修改流程任务
     * 
     * @param labFlowTask 流程任务
     * @return 结果
     */
    public int updateLabFlowTask(LabFlowTask labFlowTask);

    /**
     * 删除流程任务
     * 
     * @param taskId 流程任务ID
     * @return 结果
     */
    public int deleteLabFlowTaskById(Long taskId);

    /**
     * 批量删除流程任务
     * 
     * @param taskIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteLabFlowTaskByIds(Long[] taskIds);
    
    public List<LabFlowTask> selectLabFlowTaskByInstanceId(Long instanceId);
    
    public int resetLabFlowTask(Long taskId);
    
    public int deleteLabFlowTaskByInstanceId(Long instanceId);
    
    public LabFlowTask selectLabFlowTaskByInstanceIdAndNo(LabFlowTask labFlowTask);
    
    public int withDrawLabFlowTask(Long taskId);
    
    public int signLabFlowTask(LabFlowTask labFlowTask);
    
    public LabFlowTask selectLabFlowTaskEnd(Long instanceId);
    
    public List<LabFlowTask> selectTodoTaskList(LabFlowTask labFlowTask);
    
    public List<LabFlowTask> selectDoneTaskList(LabFlowTask labFlowTask);
    
    public LabFlowTask checkUserTaskPermit(LabFlowTask labFlowTask);
}
